<?php

	class PartnerSubscriber extends Model_Abstract
	{
		public function addNewRegUser($uid)
		{
			$sql = " INSERT INTO partner_subscriber SET user_id=? ";
			try{
				return $this->_connection->execute($sql, array( $uid ));
			}catch(Exception $e){
				QLog::log(__CLASS__.' '.__METHOD__.' --- '.$e->getMessage(), QLog::ERR);
				throw new Model_Exception($e->getMessage(), $e->getCode());
			}
		}
		
		public function addToSubUser_AIB($uid)
		{
			$sql = " INSERT INTO allinbox_subscriber SET user_id=? ";
			try{
				return $this->_connection->execute($sql, array( $uid ));
			}catch(Exception $e){
				QLog::log(__CLASS__.' '.__METHOD__.' --- '.$e->getMessage(), QLog::ERR);
				throw new Model_Exception($e->getMessage(), $e->getCode());
			}
		}
		
		public function addToSubUser_RG($uid)
		{
			$sql = " INSERT INTO resultsgeneration_subscriber SET user_id=? ";
			try{
				return $this->_connection->execute($sql, array( $uid ));
			}catch(Exception $e){
				QLog::log(__CLASS__.' '.__METHOD__.' --- '.$e->getMessage(), QLog::ERR);
				throw new Model_Exception($e->getMessage(), $e->getCode());
			}
		}
		
		public function addToSubUser_PLive($uid)
		{
			$sql = " INSERT INTO proffiliateslive_subscriber SET user_id=? ";
			try{
				return $this->_connection->execute($sql, array( $uid ));
			}catch(Exception $e){
				QLog::log(__CLASS__.' '.__METHOD__.' --- '.$e->getMessage(), QLog::ERR);
				throw new Model_Exception($e->getMessage(), $e->getCode());
			}
		}
		
	}